using System;
using System.Collections.Generic;
using System.Reflection;
namespace AppToolKit.Business.App
{
	public abstract class AppInstance
	{
		protected Dictionary<string, object> Modules
		{
			get;
			set;
		}
		public void Initialize()
		{
			Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
			for (int i = 0; i < assemblies.Length; i++)
			{
				Assembly assembly = assemblies[i];
				if (this.Modules.ContainsKey(assembly.FullName))
				{
					this.OnProcess(assembly);
				}
			}
		}
		protected abstract void OnProcess(Assembly assembly);
	}
}
